{% extends 'base.html' %}
{% block title %}欢迎光临灰灰博客{% endblock %}
{% block header %}
文章列表
{% endblock %}
{% block content %}
{% for i in category_articles %}
<div class="card mt-2 mb-2 border-warning">
    <div class="card-body">
        <h4 class="card-title">
            <span class="badge badge-danger">
                {{ i.get_category_display }}
            </span>
            <a href="/article/{{ i.article_id }}">
                {{ i.title }}
            </a>
        </h4>
        <p class="card-text">
            {{ i.content|truncatechars:20 }}...
        </p>
        <small>
            {{ i.post_datetime }}
            阅读数：{{ i.read_count }}
        </small>
    </div>
</div>
{% endfor %}
{% endblock %}